import axios from 'axios'

// const baseURL = "http://localhost:8341/"
export const baseURL = "http://localhost:3009/"

const service = axios.create({
    baseURL,
    timeout: 5000
})

service.interceptors.request.use(config => {
    return config
}, error => {

})

service.interceptors.response.use(response => {
    return response.data
}, error => { })

declare module 'axios' {
    interface AxiosInstance {
        (config: AxiosRequestConfig): Promise<any>
    }
}

export default service